import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class Driver extends Canvas
{
	final static int SCREENWIDTH = 800;
	final static int SCREENHEIGHT = 600;
	
	public Driver()
	{
		JFrame frame = new JFrame("Space Trader");
		
		JPanel panel = (JPanel) frame.getContentPane();
		panel.setPreferredSize(new Dimension(SCREENWIDTH, SCREENHEIGHT));
		setBounds(0, 0, SCREENWIDTH, SCREENHEIGHT);
		panel.add(this);
		
		frame.pack();
		frame.setResizable(false);
		frame.setVisible(true);
		
		frame.addWindowListener(
			new WindowAdapter()
			{
				public void windowClosing(WindowEvent e) {
					System.exit(0);
				}
			}
		);
		
		requestFocus();
	}
	
	public void paintComponent(Graphics g)
	{
		Graphics2D g2d = (Graphics2D)g;
	}
	
	public static void main(String[] args)
	{
		Driver driver = new Driver();
	}
}
